Packages

# dplyr, magrittr, tidyr
library(magrittr)

Downloading the data from ECDC and loading into R

From Liselotte Diaz Högberg (), on 2019-02-18:

EARS-Net data are available for public download through our Surveillance Atlas, atlas.ecdc.europa.eu/public (choose Antimicrobial resistance). The atlas includes a data export option in the top right corner. This data are open for use as long as the source is acknowledged. As a researcher, you are also welcome to access EARS-Net data through a third party data access request. Please find more information here ecdc.europa.eu/en/publications-data/european-surveillance-system-tessy and do not hesitate to contact me for further details and clarifications.

We select All time periods, All regions, All indicators that we export to the ECDC_surveillance_data_Antimicrobial_resistance.csv file on 2019-10-03

ecdc <- "ECDC_surveillance_data_Antimicrobial_resistance.csv" %>% 
  read.csv() %>% 
  dplyr::filter(Unit == "N") %>% 
  dplyr::select(-HealthTopic, -Unit, -RegionCode, -TxtValue) %>% 
  tidyr::separate(Population, c("bacteria", "test"), "\\|") %>% 
  dplyr::filter(!grepl("Combined", test)) %>% 
  dplyr::mutate_if(is.factor, as.character) %>% 
  dplyr::mutate_at("NumValue", as.integer) %>% 
  tidyr::pivot_wider(names_from = Indicator, values_from = NumValue) %>% 
  dplyr::transmute(bacteria = bacteria,
                   test     = test,
                   year     = Time,
                   country  = RegionName,
                   N        = `Total tested isolates`,
                   R        = `Resistant (R) isolates`,
                   I        = `Non-susceptible (I and R) isolates` - R)

which gives:

ecdc
## # A tibble: 10,925 x 7
##    bacteria           test             year country            N     R     I
##    <chr>              <chr>           <int> <chr>          <int> <int> <int>
##  1 Acinetobacter spp. Aminoglycosides  2012 Austria            0     0     0
##  2 Acinetobacter spp. Aminoglycosides  2012 Belgium            0     0     0
##  3 Acinetobacter spp. Aminoglycosides  2012 Bulgaria          65    38     6
##  4 Acinetobacter spp. Aminoglycosides  2012 Cyprus            23    12     0
##  5 Acinetobacter spp. Aminoglycosides  2012 Czech Republic     0     0     0
##  6 Acinetobacter spp. Aminoglycosides  2012 Germany          119     7     0
##  7 Acinetobacter spp. Aminoglycosides  2012 Denmark           77     8     0
##  8 Acinetobacter spp. Aminoglycosides  2012 Estonia            0     0     0
##  9 Acinetobacter spp. Aminoglycosides  2012 Greece          1234   964   118
## 10 Acinetobacter spp. Aminoglycosides  2012 Spain              0     0     0
## # … with 10,915 more rows

where N is the total number of samples, R is the number of samples that are resistant and I is the number of samples for which the resistance level is intermediate.

Data exploration

The ECDC data has data on 8 bacteria:

sort(unique(ecdc$bacteria))
## [1] "Acinetobacter spp."       "Enterococcus faecalis"    "Enterococcus faecium"     "Escherichia coli"        
## [5] "Klebsiella pneumoniae"    "Pseudomonas aeruginosa"   "Staphylococcus aureus"    "Streptococcus pneumoniae"

in 30 countries:

sort(unique(ecdc$country))
##  [1] "Austria"        "Belgium"        "Bulgaria"       "Croatia"        "Cyprus"         "Czech Republic" "Denmark"       
##  [8] "Estonia"        "Finland"        "France"         "Germany"        "Greece"         "Hungary"        "Iceland"       
## [15] "Ireland"        "Italy"          "Latvia"         "Lithuania"      "Luxembourg"     "Malta"          "Netherlands"   
## [22] "Norway"         "Poland"         "Portugal"       "Romania"        "Slovakia"       "Slovenia"       "Spain"         
## [29] "Sweden"         "United Kingdom"

over 18 years from 2000 to 2017

The tests of susceptibility that are performed are the following for the different bacteria:

with(ecdc, table(bacteria, test))
##                           test
## bacteria                   Aminoglycosides Aminopenicillins Carbapenems Ceftazidime Fluoroquinolones High-level gentamicin Macrolides
##   Acinetobacter spp.                   180                0         180           0              180                     0          0
##   Enterococcus faecalis                  0              511           0           0                0                   511          0
##   Enterococcus faecium                   0              511           0           0                0                   510          0
##   Escherichia coli                     512              512         510           0              512                     0          0
##   Klebsiella pneumoniae                386                0         386           0              386                     0          0
##   Pseudomonas aeruginosa               386                0         386         386              386                     0          0
##   Staphylococcus aureus                  0                0           0           0                0                     0          0
##   Streptococcus pneumoniae               0                0           0           0                0                     0        386
##                           test
## bacteria                   Meticillin (MRSA) Penicillins PiperacillinTazobactam Third-generation cephalosporins Vancomycin
##   Acinetobacter spp.                       0           0                      0                               0          0
##   Enterococcus faecalis                    0           0                      0                               0        511
##   Enterococcus faecium                     0           0                      0                               0        511
##   Escherichia coli                         0           0                      0                             512          0
##   Klebsiella pneumoniae                    0           0                      0                             386          0
##   Pseudomonas aeruginosa                   0           0                    386                               0          0
##   Staphylococcus aureus                  516           0                      0                               0          0
##   Streptococcus pneumoniae                 0         386                      0                               0          0

The number of biological tests performed in the countries naturally increases with time:

with(ecdc, table(year, country))
##       country
## year   Austria Belgium Bulgaria Croatia Cyprus Czech Republic Denmark Estonia Finland France Germany Greece Hungary Iceland Ireland
##   2000      12      12        1       0      0              1      12       4      12      0      12     12       0      12      12
##   2001      12      12       12      12      0             12      12      12      12     12      12     12      12      12      12
##   2002      12      12       12      12      0             12      12      12      12     12      12     12      12      12      12
##   2003      12      12       12      12     11             12      12      12      12     12      12     12      12      12      12
##   2004      12      12       12      12     12             12      12      12      12     12      12     12      12      12      12
##   2005      23      23       23      23     23             23      23      23      23     23      23     23      23      23      23
##   2006      23      23       23      23     23             23      23      23      23     23      23     23      23      23      23
##   2007      23      23       23      23     23             23      23      23      23     23      23     23      23      23      23
##   2008      23      23       23      23     23             23      23      23      23     23      23     23      23      23      23
##   2009      23      23       23       0     23             23      23      23      23     23      23     23      23      23      23
##   2010      23      23       23      23     23             23      23      23      23     23      23     23      23      23      23
##   2011      23      23       23      23     23             23      23      23      23     23      23     23      23      23      23
##   2012      26      26       26      26     26             26      26      26      26     26      26     26      26      26      26
##   2013      26      26       26      26     26             26      26      26      26     26      26     26      26      26      26
##   2014      26      26       26      26     26             26      26      26      26     26      26     26      26      26      26
##   2015      26      26       26      26     26             26      26      26      26     26      26     26      26      26      26
##   2016      26      26       26      26     26             26      26      26      26     26      26     26      26      26      26
##   2017      26      26       26      26     26             26      26      26      26     26      26     26      26      26      26
##       country
## year   Italy Latvia Lithuania Luxembourg Malta Netherlands Norway Poland Portugal Romania Slovakia Slovenia Spain Sweden United Kingdom
##   2000    12      0         0         12     1          12     12      0       12       0        0        1    12     12             12
##   2001    12      0         0         12    12          12     12     12       12       0       11       12    12     12             12
##   2002    12      0         0         12    12          12     12     12       12      12       12       12    12     12             12
##   2003    12      0         0         12    12          12     12     12       12      12       12       12    12     12             12
##   2004    12      1         0         12    12          12     12     12       12      12       12       12    12     12             12
##   2005    23     23         0         23    23          23     23     23       23      23       23       23    23     23             23
##   2006    23     23        23         23    23          23     23     23       23      23       23       23    23     23             23
##   2007    23     23        23         23    23          23     23     23       23      23       23       23    23     23             23
##   2008    23     23        23         23    23          23     23     23       23      23       23       23    23     23             23
##   2009    23     23        23         23    23          23     23     23       23      23        0       23    23     23             23
##   2010    23     23        23         23    23          23     23     23       23      23        0       23    23     23             23
##   2011    23     23        23         23    23          23     23     23       23      23       23       23    23     23             23
##   2012    26     26        26         26    26          26     26     26       26      26       26       26    26     26             26
##   2013    26     26        26         26    26          26     26     26       26      26       26       26    26     26             26
##   2014    26     26        26         26    26          26     26     26       26      26       26       26    26     26             26
##   2015    26     26        26         26    26          26     26     26       26      26       26       26    26     26             26
##   2016    26     26        26         26    26          26     26     26       26      26       26       26    26     26             26
##   2017    26     26        26         26    26          26     26     26       26      26       26       26    26     26             26

Modeling changes in resistance levels

A Poisson model:

\[ R_{y+1} \sim \mbox{Pois}\left(\left[R_y + \rho R_y \left(N_y - \frac{R_y}{N_y}\right)\right]\frac{N_{y + 1}}{N_y}\right) \]

A binomial model:

\[ R_{y+1} \sim \mbox{Bin}\left(N_{y+1}, \frac{R_y}{N_y} + \rho R_y \left(1 - \frac{R_y}{N_y^2}\right)\right) \]